<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/common/jsp/taglibs-nojs-nocss.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<div id="pop_up_content">
	<div class="pop_up_title images_13">
		<s:if test="null==id || ''.equal(id)">
			申请车辆
		</s:if>
		<s:else>
			编辑申请车辆
		</s:else>
	</div>
	<div class="pop_up_body">
		<form id="editForm" action="carriageEntry/carriageEntryAction!editData.action" >
		<input type="hidden" value="<s:property value='objctForm.id'/>" name="objctForm.id"/>
		<!--  
		<s:if test="null==id || ''.equal(id)">
			<input type="hidden" id="flag" value="0"/>
			<input type="hidden" value="<s:property value='carriageId'/>" name="objctForm.carriageId"/>
		</s:if>
		<s:else>
			<input id="flag" value="1" type="hidden"/>
			<input type="hidden" value="<s:property value='objctForm.carriageId'/>" name="objctForm.carriageId"/>
		</s:else>
		-->
		<table border="0" cellpadding="0" cellspacing="0" width="450px">
			<tr>
				<td>
					<div class="form_input_value" style="margin-right: 8px;">
						<span class="red">*</span>使用开始时间
					</div>
				</td>
				<td colspan="2">
					<input style="margin: 0px;" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'});" readonly="readonly" name="objctForm.useStartDate" type="text" class="dialogy_input required" value='<s:property value="objctForm.useStartDate"/>'>
				</td>
			</tr>
			<tr>
				<td>
					<div class="form_input_value" style="margin-right: 8px;">
						<span class="red">*</span>使用结束时间
					</div>
				</td>
				<td colspan="2"><input style="margin: 0px;" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'});" readonly="readonly" name="objctForm.useEndDate" type="text" class="dialogy_input required" value='<s:property value="objctForm.useEndDate"/>'></td>
			</tr>
			<tr>
				<td>
					<div class="form_input_value" style="margin-right: 8px;">
						<span class="red">*</span>事由
					</div>
				</td>
				<td colspan="2">
					<textarea style="margin: 0px;" rows="" cols="" name="objctForm.reason" style='width:320px;height:100px;overflow-y:scroll;overflow-x:hidden;margin-left: 8px;' class="longinput max_length:1000 required"><s:property value='objctForm.reason'/></textarea>
					<font color="red">【不能为空且字数限制1000字】</font>
				</td>
			</tr>
			<tr>
				<td>
					<div class="form_input_value" style="margin-right: 8px;">
						<span class="red">*</span>备注
					</div>
				</td>
				<td colspan="2">
				  <input style="margin: 0px;" id="firstPart" name="objctForm.remark" type="text" class="dialogy_input max_length:60 required" value='<s:property value="objctForm.remark"/>'>
				</td>
			</tr>
			<tr>
				<td><div class="form_input_value" style="margin-right: 8px;">
						<span class="red">*</span>审核人
					</div></td>
				<td colspan="2">
				  <!-- <input style="margin: 0px;" id="firstPart" name="objctForm.checkUesr" type="text" class="dialogy_input max_length:60 required" value='<s:property value="objctForm.checkUesr"/>' > -->
				  <select name="objctForm.checkUesr">
					<s:iterator value="userList">
						<s:if test="objctForm.checkUesr==id">
							<option value='<s:property value="id"/>' selected="selected"><s:property value="cname"/></option>
						</s:if>
						<s:else>
							<option value='<s:property value="id"/>'><s:property value="cname"/></option>
						</s:else>
							
					</s:iterator>
					</select>
				</td>
				
			</tr>
			<tr>
				<td></td>
				<td  class="dialogy_btn_td" >
					<input id="editSubmit" type="button" value="确定" class="btn" onmouseout="this.className='btn'" onmousedown="this.className='btn1'" onmouseover="this.className='btn2'">
					<input type="button" value="取消" class="btn" onclick="hideDialog();" onmouseout="this.className='btn'" onmousedown="this.className='btn1'" onmouseover="this.className='btn2'">
				</td>
			</tr>
		</table>
		</form>
	</div>
</div>
<script>

	/* 表单提交 */
	i.formSubmit("editSubmit",	//绑定的按钮id
					  "editForm" ,   //提交的表单id
					  function(result){
						  	var jsonMsgObj=new JsonMsgObj(result);
							var  msg=jsonMsgObj.getMessage();
						    var codeId=jsonMsgObj.getCodeid();
							var isOk=jsonMsgObj.getIsok();
							if( isOk ){
							    aerouiAlert(msg);
								hideDialog();// 隐藏窗口
								//if(document.getElementById("flag").value=='0'){
									//loadContentLink('carriageManage/carriageManageAction!carriageManageList.action');
								//}else{
									loadContentLink('<%=basePath %>carriageEntry/carriageEntryAction!carriageEntryList.action');
								//}
								
							}else{		// 如果编辑失败了
							  JsManageInfoHandleException( result , function(msg , codeId , isOk){
							  		hideDialog();// 隐藏窗口
							   });
						   }
						});

</script>